import { createSSRApp } from "vue";
import App from "./App.vue";
export function createApp() {
	const app = createSSRApp(App);
	
	// 添加全局生命周期钩子来检测tabBar状态
	app.config.globalProperties.$checkTabBar = function() {
		// 在H5平台上，我们可以通过检查DOM来查看tabBar是否存在
		if (typeof window !== 'undefined') {
			console.log('Checking tabBar status...');
			// 延迟检查，确保DOM已经渲染完成
			setTimeout(() => {
				const tabBarElements = document.querySelectorAll('.uni-tabbar, .tab-bar');
				console.log('TabBar elements found:', tabBarElements.length);
				tabBarElements.forEach((el, index) => {
					console.log(`TabBar element ${index}:`, el.style.display, el.style.visibility, el.style.position);
				});
			}, 1000);
		}
	};
	
	return {
		app,
	};
}
